package jin.competition.jan20co12;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class BaseDao {
	String driver = "com.mysql.jdbc.Driver";
	String database = "java3";
	String userName = "root";
	String pwd = "king";
	String url = "jdbc:mysql://localhost:3306/" + database;
	Connection con = null;

	public Connection getCon() {
		try {
			Class.forName(driver);
			con = DriverManager.getConnection(url, userName, pwd);

		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return con;
	}
}
